package com.lu.component.rpc.boot.core.config;

import com.lu.component.rpc.boot.core.constants.enums.RpcProtocolEnum;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.logging.LogLevel;
import org.springframework.context.annotation.Configuration;

/**
 * 客户端配置
 *
 * @author: zhanglu
 * @date: 2023/7/6 17:48
 * @modify: 修改人信息, 修改内容 2023/7/6 17:48
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "rpc.boot.client")
public class RpcClientProperties {

    /**
     * 协议
     */
    private RpcProtocolEnum protocol;

    /**
     * 超时时间 单位ms
     */
    private Long timeout;

    /**
     * 日志级别
     */
    private LogLevel logLevel;

    public void setProtocol(RpcProtocolEnum protocol) {
        this.protocol = protocol;
    }

    public void setTimeout(Long timeout) {
        this.timeout = timeout;
    }

    public void setLogLevel(LogLevel logLevel) {
        this.logLevel = logLevel;
    }
}
